package edu.hawaii.wicket.page.lighting;

import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import edu.hawaii.wicket.page.BasePage;
import edu.hawaii.wicket.page.ac.ACPage;
import edu.hawaii.wicket.page.aquaponics.AquaponicsPage;
import edu.hawaii.wicket.page.security.SecurityPage;
import edu.hawaii.wicket.page.water.WaterPage;

/**
 * 
 * @author kurtteichman
 *
 */
public class LightingPage extends BasePage {
  private static final long serialVersionUID = 1L;
  /**
   * 
   */
  private static final ResourceReference SIDE_BAR = new ResourceReference(
      LightingPage.class,"side-bar.png");
  private static final ResourceReference LOGO = new ResourceReference(
      LightingPage.class,"logo.png");
  private static final ResourceReference LIGHTING_TOP = new ResourceReference(
      LightingPage.class,"lightingtop.png");
  private static final ResourceReference LIGHTING_BOTTOM = new ResourceReference(
      LightingPage.class,"lightingbottom.png");
  private static final ResourceReference LIGHTING_CONTROLS = new ResourceReference(
      LightingPage.class,"lightingcontrols.png");
  /**
   * Creates the Lighting page.
   */
  public LightingPage() {
 // Now add the links that go in the tabs. 
    add(new Link<String>("AquaponicsPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to HomePage. */
      @Override
      public void onClick() {
        setResponsePage(new AquaponicsPage());
      }
      }
    );
    
    add(new Link<String>("LightingPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to ListPage. */
      @Override
      public void onClick() {
        setResponsePage(new LightingPage());
      } 
      }
    );
    
    add(new Link<String>("SecurityPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to FormPage. */
      @Override
      public void onClick() {
        setResponsePage(new SecurityPage());
      }
      }
    );
    
    add(new Link<String>("ClimatePageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to TablePage. */
      @Override
      public void onClick() {
        setResponsePage(new ACPage());
      }
      }
    );
    
    add(new Link<String>("WaterPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to TablePage. */
      @Override
      public void onClick() {
        setResponsePage(new WaterPage());
      }
      }
    );
    
    add(new Image("sidebar", new Model<ResourceReference>(SIDE_BAR)));
    add(new Image("logo", new Model<ResourceReference>(LOGO)));
    add(new Image("lightingtop", new Model<ResourceReference>(LIGHTING_TOP)));
    add(new Image("lightingbottom", new Model<ResourceReference>(LIGHTING_BOTTOM)));
    add(new Image("lightingcontrols", new Model<ResourceReference>(LIGHTING_CONTROLS)));
  }
}
